using UnityEngine;
using System.Collections;

public class Textures1 : MonoBehaviour {
//public Texture[] tex = new Texture[4];
public Texture tex1,tex2, tex3, tex0;
public Texture[] tex = new Texture[23];
public  GameObject[] obj= new GameObject[18];
static int index = 0;
//	public Texture bumpMap;

//	private GameObject obj;
//public GameObject[] obj = new GameObject[4];
	// Use this for initialization
	void Start () {
/*		obj[0] = GameObject.Find("1");
		obj[1] = GameObject.Find("2");
		obj[2] = GameObject.Find("3");
*/	}
	
	// Update is called once per frame
	void Update () {
		if (Input.GetKeyDown(KeyCode.Space))
			index++;
			//1.
		obj[9].renderer.material.mainTexture = tex[index];	
		//2.
	    objCube[0].renderer.material.SetTexture("_MainTex", tex1);
		//3.
            string url = "file:///" + fileName[sequence+i];
            www = new WWW(url);
            obj[selection + i].renderer.material.mainTexture = www.texture;
	}
}
